
<html>
<head>
    <title>下拉菜单切换模块</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }
        .module {
            display: none;
        }
    </style>
</head>
<body>
    <select id="menu">
        <option value="module1">模块1</option>
        <option value="module2">模块2</option>
        <option value="module3">模块3</option>
    </select>

    <div id="module1" class="module">
        <h2>模块1</h2>
        <p>这是模块1的内容。</p>
    </div>

    <div id="module2" class="module">
        <h2>模块2</h2>
        <p>这是模块2的内容。</p>
    </div>

    <div id="module3" class="module">
        <h2>模块3</h2>
        <p>这是模块3的内容。</p>
    </div>

    <script>
        document.getElementById("menu").addEventListener("change", function() {
            var selectedModule = this.value;
            var modules = document.getElementsByClassName("module");
            for (var i = 0; i < modules.length; i++) {
                modules[i].style.display = "none";
            }
            document.getElementById(selectedModule).style.display = "block";
        });
        </script>
   <strong></strong>